package com.report.common;

public enum DataSetCategory {
    PUBLIC(0), EXCEL(1), WORD(2);

    private int code = 0;

    private DataSetCategory(int code) {
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public static DataSetCategory get(int code) {
        switch (code) {
            case 0:
                return DataSetCategory.PUBLIC;
            case 1:
                return DataSetCategory.EXCEL;
            case 2:
                return DataSetCategory.WORD;
            default:
                return null;
        }
    }
}
